<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title> 层级选择器 </title>
    <style>
        .htj{
            color: chocolate;
        }

        .htj > p{
            color: red;
        }

        .htj .kx{
            color: blue;
        }

        .htj .kx:hover{
            color: red;
            font-size: 20px;
        }


        .htj .kx ~ p{
            color: green;
        }
    </style>
</head>
<body>
    <div class="htj">
        <p>皇太极</p>
        <div>
            <p>顺治</p>
            <div>
                <p class="kx">康熙</p>
                <p>雍正</p>
                <p>乾隆</p>
            </div>
        </div>
    </div>
</body>
</html>